// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_HR_ATTENDANCE_RECORD
// * CreateDate    : 2011/11/9 10:05:21
// * Creater       : CodeSmith
// * LastChangeDate: 2011/11/9 10:05:21
// * LastChanger   : 2011/11/9 10:05:21
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class HrAttendanceRecordEntity : EntityBase
    {
        public HrAttendanceRecordTable TableSchema
        {
            get
            {
                return HrAttendanceRecordTable.Current;
            }
		}
		
		public HrAttendanceRecordEntity()
        {

        }
		
		public HrAttendanceRecordEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.AttendanceId = Convert.ToString(CommonFunctions.ToObject(dr["ATTENDANCE_ID"]));
			this.PersonCode = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_CODE"]));
			this.PersonName = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_NAME"]));
			this.AttendanceDate = Convert.ToString(CommonFunctions.ToObject(dr["ATTENDANCE_DATE"]));
			this.WeekDay = Convert.ToString(CommonFunctions.ToObject(dr["WEEK_DAY"]));
			this.WorkCode = Convert.ToString(CommonFunctions.ToObject(dr["WORK_CODE"]));
			this.StartTime1 = Convert.ToString(CommonFunctions.ToObject(dr["START_TIME1"]));
			this.EndTime1 = Convert.ToString(CommonFunctions.ToObject(dr["END_TIME1"]));
			this.StartTime2 = Convert.ToString(CommonFunctions.ToObject(dr["START_TIME2"]));
			this.EndTime2 = Convert.ToString(CommonFunctions.ToObject(dr["END_TIME2"]));
			this.StartTime3 = Convert.ToString(CommonFunctions.ToObject(dr["START_TIME3"]));
			this.EndTime3 = Convert.ToString(CommonFunctions.ToObject(dr["END_TIME3"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.AttendanceDay = Convert.ToDecimal(CommonFunctions.ToObject(dr["ATTENDANCE_DAY"]));
			this.AbsentDay = Convert.ToDecimal(CommonFunctions.ToObject(dr["ABSENT_DAY"]));
			this.TravelDay = Convert.ToDecimal(CommonFunctions.ToObject(dr["TRAVEL_DAY"]));
			this.WaitingDay = Convert.ToDecimal(CommonFunctions.ToObject(dr["WAITING_DAY"]));
			this.AttendanceHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["ATTENDANCE_HOUR"]));
			this.AbsentHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["ABSENT_HOUR"]));
			this.NormalHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["NORMAL_HOUR"]));
			this.WeekendHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["WEEKEND_HOUR"]));
			this.HolidayHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["HOLIDAY_HOUR"]));
			this.OnDutyHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["ON_DUTY_HOUR"]));
			this.TravelHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["TRAVEL_HOUR"]));
			this.WaitingHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["WAITING_HOUR"]));
			this.LatedMiniter = Convert.ToDecimal(CommonFunctions.ToObject(dr["LATED_MINITER"]));
			this.LeaveEarlyMiniter = Convert.ToDecimal(CommonFunctions.ToObject(dr["LEAVE_EARLY_MINITER"]));
			this.OvertimeCount = Convert.ToDecimal(CommonFunctions.ToObject(dr["OVERTIME_COUNT"]));
			this.IsApproved = Convert.ToString(CommonFunctions.ToObject(dr["IS_APPROVED"]));
        }
		
		public HrAttendanceRecordEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.AttendanceId = Convert.ToString(CommonFunctions.ToObject(dr["ATTENDANCE_ID"]));
			this.PersonCode = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_CODE"]));
			this.PersonName = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_NAME"]));
			this.AttendanceDate = Convert.ToString(CommonFunctions.ToObject(dr["ATTENDANCE_DATE"]));
			this.WeekDay = Convert.ToString(CommonFunctions.ToObject(dr["WEEK_DAY"]));
			this.WorkCode = Convert.ToString(CommonFunctions.ToObject(dr["WORK_CODE"]));
			this.StartTime1 = Convert.ToString(CommonFunctions.ToObject(dr["START_TIME1"]));
			this.EndTime1 = Convert.ToString(CommonFunctions.ToObject(dr["END_TIME1"]));
			this.StartTime2 = Convert.ToString(CommonFunctions.ToObject(dr["START_TIME2"]));
			this.EndTime2 = Convert.ToString(CommonFunctions.ToObject(dr["END_TIME2"]));
			this.StartTime3 = Convert.ToString(CommonFunctions.ToObject(dr["START_TIME3"]));
			this.EndTime3 = Convert.ToString(CommonFunctions.ToObject(dr["END_TIME3"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.AttendanceDay = Convert.ToDecimal(CommonFunctions.ToObject(dr["ATTENDANCE_DAY"]));
			this.AbsentDay = Convert.ToDecimal(CommonFunctions.ToObject(dr["ABSENT_DAY"]));
			this.TravelDay = Convert.ToDecimal(CommonFunctions.ToObject(dr["TRAVEL_DAY"]));
			this.WaitingDay = Convert.ToDecimal(CommonFunctions.ToObject(dr["WAITING_DAY"]));
			this.AttendanceHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["ATTENDANCE_HOUR"]));
			this.AbsentHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["ABSENT_HOUR"]));
			this.NormalHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["NORMAL_HOUR"]));
			this.WeekendHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["WEEKEND_HOUR"]));
			this.HolidayHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["HOLIDAY_HOUR"]));
			this.OnDutyHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["ON_DUTY_HOUR"]));
			this.TravelHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["TRAVEL_HOUR"]));
			this.WaitingHour = Convert.ToDecimal(CommonFunctions.ToObject(dr["WAITING_HOUR"]));
			this.LatedMiniter = Convert.ToDecimal(CommonFunctions.ToObject(dr["LATED_MINITER"]));
			this.LeaveEarlyMiniter = Convert.ToDecimal(CommonFunctions.ToObject(dr["LEAVE_EARLY_MINITER"]));
			this.OvertimeCount = Convert.ToDecimal(CommonFunctions.ToObject(dr["OVERTIME_COUNT"]));
			this.IsApproved = Convert.ToString(CommonFunctions.ToObject(dr["IS_APPROVED"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HrAttendanceRecordTable.Current;
            }
        }
		
		#region Perporty List
        public string AttendanceId
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_ATTENDANCE_ID)); }
            set { SetData(HrAttendanceRecordTable.C_ATTENDANCE_ID, value); }
        }
		
        public string PersonCode
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_PERSON_CODE)); }
            set { SetData(HrAttendanceRecordTable.C_PERSON_CODE, value); }
        }
		
        public string PersonName
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_PERSON_NAME)); }
            set { SetData(HrAttendanceRecordTable.C_PERSON_NAME, value); }
        }
		
        public string AttendanceDate
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_ATTENDANCE_DATE)); }
            set { SetData(HrAttendanceRecordTable.C_ATTENDANCE_DATE, value); }
        }
		
        public string WeekDay
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_WEEK_DAY)); }
            set { SetData(HrAttendanceRecordTable.C_WEEK_DAY, value); }
        }
		
        public string WorkCode
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_WORK_CODE)); }
            set { SetData(HrAttendanceRecordTable.C_WORK_CODE, value); }
        }
		
        public string StartTime1
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_START_TIME1)); }
            set { SetData(HrAttendanceRecordTable.C_START_TIME1, value); }
        }
		
        public string EndTime1
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_END_TIME1)); }
            set { SetData(HrAttendanceRecordTable.C_END_TIME1, value); }
        }
		
        public string StartTime2
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_START_TIME2)); }
            set { SetData(HrAttendanceRecordTable.C_START_TIME2, value); }
        }
		
        public string EndTime2
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_END_TIME2)); }
            set { SetData(HrAttendanceRecordTable.C_END_TIME2, value); }
        }
		
        public string StartTime3
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_START_TIME3)); }
            set { SetData(HrAttendanceRecordTable.C_START_TIME3, value); }
        }
		
        public string EndTime3
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_END_TIME3)); }
            set { SetData(HrAttendanceRecordTable.C_END_TIME3, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_REMARK)); }
            set { SetData(HrAttendanceRecordTable.C_REMARK, value); }
        }
		
        public decimal AttendanceDay
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_ATTENDANCE_DAY)); }
            set { SetData(HrAttendanceRecordTable.C_ATTENDANCE_DAY, value); }
        }
		
        public decimal AbsentDay
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_ABSENT_DAY)); }
            set { SetData(HrAttendanceRecordTable.C_ABSENT_DAY, value); }
        }
		
        public decimal TravelDay
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_TRAVEL_DAY)); }
            set { SetData(HrAttendanceRecordTable.C_TRAVEL_DAY, value); }
        }
		
        public decimal WaitingDay
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_WAITING_DAY)); }
            set { SetData(HrAttendanceRecordTable.C_WAITING_DAY, value); }
        }
		
        public decimal AttendanceHour
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_ATTENDANCE_HOUR)); }
            set { SetData(HrAttendanceRecordTable.C_ATTENDANCE_HOUR, value); }
        }
		
        public decimal AbsentHour
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_ABSENT_HOUR)); }
            set { SetData(HrAttendanceRecordTable.C_ABSENT_HOUR, value); }
        }
		
        public decimal NormalHour
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_NORMAL_HOUR)); }
            set { SetData(HrAttendanceRecordTable.C_NORMAL_HOUR, value); }
        }
		
        public decimal WeekendHour
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_WEEKEND_HOUR)); }
            set { SetData(HrAttendanceRecordTable.C_WEEKEND_HOUR, value); }
        }
		
        public decimal HolidayHour
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_HOLIDAY_HOUR)); }
            set { SetData(HrAttendanceRecordTable.C_HOLIDAY_HOUR, value); }
        }
		
        public decimal OnDutyHour
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_ON_DUTY_HOUR)); }
            set { SetData(HrAttendanceRecordTable.C_ON_DUTY_HOUR, value); }
        }
		
        public decimal TravelHour
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_TRAVEL_HOUR)); }
            set { SetData(HrAttendanceRecordTable.C_TRAVEL_HOUR, value); }
        }
		
        public decimal WaitingHour
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_WAITING_HOUR)); }
            set { SetData(HrAttendanceRecordTable.C_WAITING_HOUR, value); }
        }
		
        public decimal LatedMiniter
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_LATED_MINITER)); }
            set { SetData(HrAttendanceRecordTable.C_LATED_MINITER, value); }
        }
		
        public decimal LeaveEarlyMiniter
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_LEAVE_EARLY_MINITER)); }
            set { SetData(HrAttendanceRecordTable.C_LEAVE_EARLY_MINITER, value); }
        }
		
        public decimal OvertimeCount
        {
            get { return Convert.ToDecimal(GetData(HrAttendanceRecordTable.C_OVERTIME_COUNT)); }
            set { SetData(HrAttendanceRecordTable.C_OVERTIME_COUNT, value); }
        }
		
        public string IsApproved
        {
            get { return Convert.ToString(GetData(HrAttendanceRecordTable.C_IS_APPROVED)); }
            set { SetData(HrAttendanceRecordTable.C_IS_APPROVED, value); }
        }
		
		#endregion
	}
	
	
}	

